package com.zycx.common.page;

import lombok.Data;

/**
 * Description:  Layui 分页实体类
 * Created by zycx on 2018-12-10 22:18
 * Created with IntelliJ IDEA.
 */
@Data
public class ServerResponseTable {

    private int status;

    private boolean success;

    private int code = 0;

    private long count;

    private Object data;

    private String msg;

    public ServerResponseTable() {
        super();
    }

    public ServerResponseTable(long count, Object data) {
        if (count > 0) {
            this.success = true;
            this.status = 200;
        }
        if (count == 0) {
            this.status = 200;
            this.success = true;
            this.msg = "暂无数据！";
        }
        this.data = data;
    }

    public ServerResponseTable(long count, Object data, String msg) {
        this.status = 200;
        this.success = true;
        this.msg = msg;
        this.data = data;
    }

    public ServerResponseTable(int status, Object data, String msg) {
        this.status = status;
        this.success = true;
        this.msg = msg;
        this.data = data;
    }


}
